home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 71.zip
/
BS1 part 71
/
X-Cad3000_d5.adf
/
XCdoc
/
drawtext
< prev
next >
Wrap
Text File
|
1991-11-22
|
11KB
|
257 lines
5.9.1 DRAW TEXT
The DRAW TEXT command is used to draw one or more text entities. The
parameters used to define the text height and width etc. are taken from the
selected parameters defined for the viewport or the system default
parameters. Any of these parameters can be altered within the command by
using the PARAMETERS modifier.
COMMAND FORMAT
#DRAW TEXT TEXT string [modifiers] :Loc x1 x2 ... xn [:Loc x1 ... ]
Text entities are drawn at each location entered after the colon. ( See fig.
5.62 ). If more than one string is specified after the TEXT modifier, then
the separate text strings are drawn sequentially at each location. ( See
fig. 5.63 ). If more locations than strings are entered, the text strings
will be drawn starting at the beginning of the list again after the last
has been drawn.
If a colon is entered in the IDENTS stream, the text strings will be drawn
starting at the first of any list of text strings entered after the TEXT
modifier.
MODIFIERS
LAYER Requires a layer number. This will override the current
active layer.
DEPTH Requires a depth number. This will override the current
active depth.
TEXT The TEXT modifier is followed by one or more text strings
each of which will be drawn as a text entity. The string
itself can be entered in one of three ways:
TEXT string
If the required string consists of standard alpha-numeric
characters, it can be typed as is - delimiters are not
required.
TEXT "string"
If the required string contains any characters that may have
some special meaning in the command line - a colon or return
for example - then delimiters must be used to enclose the
string. There are several characters that may be used as
text delimiters, for a full description see the documentation
for command format.
TEXT ""string1"string2"stringN""
If more than one string is going to be entered for the
command, then each individual string must be separated by
a common delimiter. The start and end of the complete
sequence of strings must be prefixed and suffixed with
double delimiters.
The total maximum number of characters for all strings must
not exceed 1024 characters.
RECTANGLE If the RECTANGLE modifier is used, then the position, height
and width of the text string is calculated to fit into a
specified rectangle. The command format differs slightly
when using this modifier:
#DRAW TEXT TEXT string RECTANGLE :Loc x1 x2 [:Loc ... ]
The locations 'x1' and 'x2' define the extents of a
rectangle into which the text will be fitted. ( See fig. 5.64
).
Using RECTANGLE excludes the use of the HEIGHT, WIDTH and
ANGLE modifiers.
INCREMENT The INCREMENT modifier can be used to increment the last
numeric value or alphbetic character of a text string in
ascending or descending order.
As an example, if the command
#DRAW TEXT TEXT pin18 INCREMENT ASCENDING :Loc x1 x2 ...
was used, the text entities created at each location
entered after the colon would appear as:
"pin18"
"pin19"
"pin20" etc.
If the text string ends in a numeric value, the value can
be incremented infinitley but can only be decremented to
zero. If the last character is alphabetic, when the
characters 'z' or 'Z' are reached, the next occurance of
the string will restart with the last letter 'a' or 'A'.
The modifier should be followed by one of two keywords:
ASCENDING For ascending increments.
DESCENDING For descending increments.
( See fig. 5.65 ).
TNODE The TNODE modifier is used to relate a text entity to an
existing tnode entity. Using TNODE excludes entering any
text parameters as the text entity will take its parameters
from the identified tnode.
The command format when using the TNODE modifier is as
follows:
#DRAW TEXT TEXT string TNODE :Ent x1 x2 ... x2 [:Ent ... ]
Instead of entering locations for each text entity, an
existing tnode must be identified. The identified tnode is
used to provide the text origin and parameters.
The relationship created between the text and tnode entities
is a parent/child relationship where the tnode is the parent
entity and the text is the child entity. Therefore if the
tnode is moved or deleted, the text entity will also be
moved or deleted. Modifying the text entity will not affect
its parent tnode.
PARAMETERS The PARAMETERS modifier is used to enter a further family
of modifiers used to control the text parameters and
appearance.
.HEIGHT A real value defining the character height. ( See fig. 5.66
).
.WIDTH A real value defining the character width. If the HEIGHT
modifier is used without the WIDTH modifier, the character
width will be set to its default width in proportion to
the character height.
.ANGLE Text angle in degrees. ( See fig. 5.67 ).
.ALIGN The ALIGN modifier allows you to derive the angle for the
text by aligning it to a segment of an existing line, string,
polygon or xhatch polygon entity. The command format changes
slightly when ALIGN is used:
#DRAW TEXT TEXT string PARAMETERS ALIGN
:Ent x1 :Loc x2 x3 ... xn [:Ent ... ]
'x1' is used to select the required entity. The angle of the
segment identified will be used to obtain the angle for the
text. Only angle in the region of +/- 90 degrees will be
used. Locations 'x2' through to 'xn' define the origin points
for text entities.
ALIGN excludes use of the ANGLE modifier.
.SLANT Text slant in degrees. A slant of zero will produce
standard upright text. A positive angle, say 10 degrees,
will slant the text to the right. A negative angle will
slant the text to the left.
.SPACING Should be followed by one of two keywords:
PROPORTIONAL Which will produce proportionally
spaced characters.
UNIFORM Which will produce uniformly spaced
characters. Uniform spacing is required
in circumstances where tables or data
need to align vertically. ( See fig.
5.68 ).
.CHARSPACING Requires a real value defining the distance between
adjacent characters as a proportion of the character width.
A value of zero will align characters with no space between
them. A value of .5 will space each character by half the
width of the character. Negative values can be used to
produce overlapping characters.
.LINESPACING A real value defining the spacing of vertically adjacent
text strings as a proportion of the character height. A
value of 1.5 will separate each line by half the character
height. A value of 1 will leave no space between lines.
.BOXED A flag indicating a box will be placed around the text.
.FONT The name of an existing text font or a new font created
with the DEFINE FONT command. ( See fig. 5.69 ).
.JUSTIFY Requires one of three keywords which define how the text
will be positioned relative to its input location:
LEFT Text will be left justified.
CENTRE Text will be centre justified.
RIGHT Text will be right justified.
( See fig 5.70 ).
.NOFILL Disables text fill if it is currently selected.
The following modifiers affect the graphic appearance of the text. The
FILLED modifier can only be used on text fonts that may be filled. Fonts
such as the default STANDARD font cannot be filled.
.FILLED Specifies that the text is to be filled with a solid colour
or patternfill. If none of the following modifiers are used,
the text will be filled with the colour assigned to the
layer it will be created on.
..COLOURFILL Requires a colour number which will be used to fill the
text overriding the default layer colour assignment.
...OUTLINE Will outline a colour filled character in the layer
dependent colour.
..PATTERNFILL Takes the name of a patternfill which will be used to fill
the text. To view all of the currently defined patternfills,
use the command DISPLAY PATTERNFILL.
...COLOUR Only applicable to single colour patternfills. As with the
modifier COLOURFILL, a colour number is entered which will
be used as the patternfill colour overiding the default
layer colour assignment.
....BACKGROUND Specifies that the patternfill background areas are to be
filled with the layer dependent colour. If this modifier
is not used, the background is filled with the background
colour ( colour 0 ).
...OUTLINE Will outline a patternfilled character in the layer
dependent colour.
The following modifiers can be used to alter the graphic appearance of any
type of text font.
.HARDFONT Specifies that a hardware font will be selected. If this
modifier is used without specifying a style and thickness,
any previous hardfont selection made with SELECT TEXT is
cancelled. The default will be set ( style 0 thickness 1 ).
..STYLE Requires one of the hardware line-style numbers 0 to 15. To
view the hardware line-styles, use the command DISPLAY
HARDFONT.
..THICKNESS Display line thickness, a value between 1 and 5.
ATTRIBUTE Used to enter one or more attributes associated with this
entity. For a full description of the ATTRIBUTE option, see
the documentation for the command ADD ATTRIBUTE.